package com.cuitrip.business.webview;

import android.webkit.JavascriptInterface;

/**
 * 提供给JS调用的接口申明,JS注册名:TripInsiderJsBridge
 * Created by ak
 */
public class WebViewMusicianJsInterface {

    public static final String JS_INSIDER = "CuiTripJsBridge";

    private WebViewJsListener mWebViewJsListener;

    public WebViewMusicianJsInterface(WebViewJsListener listener) {
        mWebViewJsListener = listener;
    }

    @JavascriptInterface
    public void showToast(String message) {
        if (null != mWebViewJsListener) {
            mWebViewJsListener.showToast(message);
        }
    }

    @JavascriptInterface
    public void setTitle(String title) {
        if (null != mWebViewJsListener) {
            mWebViewJsListener.setTitle(title);
        }
    }
    @JavascriptInterface
    public void becomeInsider(){
        if (null!=mWebViewJsListener){
            mWebViewJsListener.becomeInsider();
        }
    }


}
